package com.fz.mapper;

import com.fz.entity.Book;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by webrx on 2017-08-24.
 */
public interface BookMapper {

    @Select("select * from db_book")
    public List<Book> query();

    @Insert("insert into db_book values(null,#{name},#{price},#{bdate})")
    public int insert(Book book);

    public Book queryById(int id);
    //这个方法没有注解，就要使用配置的方法
}
